import App from '../App'
import Index from '../router/index'
import Loan from '../router/invest'
import News from '../router/news'
import User from '../router/user'
import Survey from '../router/user/survey'
//import Item from '../router/item'
//import Detail from '../router/detail'
//import Group from '../router/group'

export default function(router) {




    router.map({

        '/': {
            name: 'home',
            component: Index,
            meta: {
                keepAlive: false
            }
        },

        '*': {
            name: 'home',
            component: Index,
            meta: {
                keepAlive: false
            }
        },

        '/invest/:listId': {
            name: 'invest',
            component: Loan,
            meta: {
                keepAlive: false
            }
        },

        '/survey': {
            name: 'survey',
            component: Survey,
            meta: {
                keepAlive: false
            }
        },


        '/news/:ntype': {
            //'/news': {
            name: 'news',
            component: News
        },

        '/user': {
            name: 'user',
            component: User,
            meta: {
                keepAlive: false
            }
        },

        '/invest/group/:groupId': {
            name: 'group',
            component: function(resolve) {
                require(['../router/invest/group'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/invest/group-sub/:typeId': {
            name: 'group-sub',
            component: function(resolve) {
                require(['../router/invest/group-sub'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/openAccount/': {
            name: 'openAccount',
            component: function(resolve) {
                require(['../router/user/openAccount'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/invest/item/:itemId': {
            name: 'item',
            component: function(resolve) {
                require(['../router/invest/item'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/news/detail/:newsId': {
            name: 'newsDetail',
            component: function(resolve) {
                require(['../router/news/detail'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/faqs/detail/:faqsId': {
            name: 'faqsDetail',
            component: function(resolve) {
                require(['../router/faqs/detail'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },





        '/invest/detail/:detailId': {
            name: 'detail',
            component: function(resolve) {
                require(['../router/invest/detail'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },



        '/invest/detail-sub/:typeId': {
            name: 'detail-sub',
            component: function(resolve) {
                require(['../router/invest/detail-sub'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/user-setup': {
            name: 'setup',
            component: function(resolve) {
                require(['../router/user/setting'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/protrait': {
            name: 'protrait',
            component: function(resolve) {
                require(['../router/user/protrait'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/friends-report': {
            name: 'friends-report',
            component: function(resolve) {
                require(['../router/user/friends-report'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/report/:reportId': {
            name: 'report',
            component: function(resolve) {
                require(['../router/news/report'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/friends-list': {
            name: 'friends-list',
            component: function(resolve) {
                require(['../router/user/friends-list'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/friends-invite-list': {
            name: 'friends-invite-list',
            component: function(resolve) {
                require(['../router/user/friends-invite-list'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/auto-buy': {
            name: 'auto-buy',
            component: function(resolve) {
                require(['../router/user/auto-buy'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/auto-buy-ranking': {
            name: 'auto-buy-ranking',
            component: function(resolve) {
                require(['../router/user/auto-buy-ranking'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/auto-buy-sub/:typeId': {
            name: 'autobuysub',
            component: function(resolve) {
                require(['../router/user/auto_buy_sub'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/add-friend': {
            name: 'add-friend',
            component: function(resolve) {
                require(['../router/user/add_friend'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/invest-record': {
            name: 'reg',
            component: function(resolve) {
                require(['../router/user/invest-record'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/money-record': {
            name: 'money-record',
            component: function(resolve) {
                require(['../router/user/money-record'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/message': {
            name: 'message',
            component: function(resolve) {
                require(['../router/user/message'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/reg': {
            name: 'reg',
            component: function(resolve) {
                require(['../router/user/reg'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/reg_no_ad': {
            name: 'reg_no_ad',
            component: function (resolve) {
                require(['../router/user/reg_no_ad'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        
        '/login': {
            name: 'login',
            component: function(resolve) {
                require(['../router/user/login'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/invest/guarantee/:borrow_nid': {
            name: 'guarantee',
            component: function(resolve) {
                require(['../router/invest/guarantee'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/recharge': {
            name: 'recharge',
            component: function(resolve) {
                require(['../router/user/recharge'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/recharge-record': {
            name: 'recharge_record',
            component: function(resolve) {
                require(['../router/user/recharge_record'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/withdraw-cash': {
            name: 'withdraw-cash',
            component: function(resolve) {
                require(['../router/user/withdraw-cash'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/withdraw-record': {
            name: 'withdraw_record',
            component: function(resolve) {
                require(['../router/user/withdraw_record'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/loan': {
            name: 'userloan',
            component: function(resolve) {
                require(['../router/user/user-loan'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/loan/list': {
            name: 'userloanList',
            component: function(resolve) {
                require(['../router/user/loan-list'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/loan/info-list': {
            name: 'userloanInfoList',
            component: function(resolve) {
                require(['../router/user/loan-list-info'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/loan/pay/:loanID': {
            name: 'userloanPay',
            component: function(resolve) {
                require(['../router/user/loan-pay'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },



        '/apply-loan': {
            name: 'applyloan',
            component: function(resolve) {
                require(['../router/user/apply-loan'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/aboutus': {
            name: 'aboutus',
            component: function(resolve) {
                require(['../router/aboutus/aboutus'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/par': {
            name: 'aboutus',
            component: function(resolve) {
                require(['../router/aboutus/aboutus'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/partner/:pid': {
            name: 'partner',
            component: function(resolve) {
                require(['../router/aboutus/partner'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },
        '/analysis': {
            name: 'analysis',
            component: function(resolve) {
                require(['../router/aboutus/analysis'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/faqs': {
            name: 'faqs',
            component: function(resolve) {
                require(['../router/faqs/index'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/promotion': {
            name: 'promotion',
            component: function(resolve) {
                require(['../router/aboutus/promotion'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/invite': {
            name: 'invite',
            component: function(resolve) {
                require(['../router/user/invite-page'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/shopping': {
            name: 'shopping',
            component: function(resolve) {
                require(['../router/user/shopping'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/point-record': {
            name: 'pointrecord',
            component: function(resolve) {
                require(['../router/user/point-record'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/forget-pwd': {
            name: 'editpwd',
            component: function(resolve) {
                require(['../router/user/forget-pwd'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/user/sign-contract': {
            name: 'signContract',
            component: function (resolve) {
                require(['../router/user/contract'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/user/profile': {
            name: 'editpwd',
            component: function(resolve) {
                require(['../router/user/profile'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },



        '/user/editphone': {
            name: 'editphone',
            component: function(resolve) {
                require(['../router/user/edit_phone'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },


        '/promotion/170711': {
            name: 'promotion_170711',
            component: function(resolve) {
                require(['../router/promotion/170711'], resolve)
            },
            meta: {
                keepAlive: false
            }
        },

        '/promotion/nationalday': {
            name: 'promotion_nationalday',
            component: function(resolve) {
                require(['../router/promotion/nationalday'], resolve)
            },
            meta: {
                keepAlive: false
            }
        }


    })
}
